#include <iostream>
using namespace std;

int main(){
	int n;
	cin>>n;
	int b=0,l=0;
	for(int i=0;i<n;i++){
		int ll;
		cin>>ll;
		if(ll == 1)
			b++;
		else
			l++;
	}
	if(b == 0){
		for(int i=0;i<n;i++)
			cout<<-1<<" ";
		return 0;
	}
	if(n == 4  &&  b == l){
		cout<<"1 -1 -1 1";
		return 0;
	}
	if(b > l){
		b -= l;
		for(int i=0;i<b/2;i++)
			cout<<1<<" ";
		for(int i=0;i<l;i++)
			cout<<1<<" "<<-1<<" ";
		for(int i=0;i<b-b/2;i++)
			cout<<1<<" ";
	}
	else if(b == l){
		for(int i=0;i<n;i++){
			if(i%2 == 0)
				cout<<1<<" ";
			else
				cout<<-1<<" ";
		}
	}
	else if(b < l){
		b--;
		for(int i=0;i<b;i++)
			cout<<1<<" "<<-1<<" ";
		cout<<1<<" ";
		for(int i=0;i<l-b;i++)
			cout<<-1<<" ";
	}
	return 0;
}
